Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ganu] Week 5 #845

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

[ganu] Week 5 #845

wants to merge 6 commits into from

Conversation

gwbaik9717
Copy link
Contributor

@gwbaik9717 gwbaik9717 commented Jan 4, 2025

답안 제출 문제

체크 리스트

  • 우측 메뉴에서 PR을 Projects에 추가해주세요.
  • Projects의 오른쪽 버튼(▼)을 눌러 확장한 뒤, Week를 현재 주차로 설정해주세요.
  • 바로 앞에 PR을 열어주신 분을 코드 검토자로 지정해주세요.
  • 문제를 모두 푸시면 프로젝트에서 StatusIn Review로 설정해주세요.
  • 코드 검토자 1분 이상으로부터 승인을 받으셨다면 PR을 병합해주세요.

@gwbaik9717 gwbaik9717 self-assigned this Jan 4, 2025
@gwbaik9717 gwbaik9717 requested a review from a team as a code owner January 4, 2025 23:32
@github-actions github-actions bot added the js label Jan 4, 2025
@gwbaik9717 gwbaik9717 requested a review from eunhwa99 January 4, 2025 23:33
@gwbaik9717 gwbaik9717 changed the title [ganu ]Week 5 [ganu] Week 5 Jan 4, 2025
Copy link
Contributor

@HC-kang HC-kang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gwbaik9717 님, 5주차도 고생하셨습니다.
아직 Solving 중이셔서 우선 코멘트만 남깁니다!
워낙 잘 작성해주셔서 코멘트 남기기가 민망하네요..ㅎㅎ
앞으로도 좋은 코드 많이 공유 부탁드려요~

);

for (const chr of str) {
const index = chr.charCodeAt() - "a".charCodeAt();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

중요하지 않은 사항입니다.
"a".charCodeAt()를 변수로 먼저 빼두는것도 좋지 않을까 싶네요!

Trie.prototype.search = function (word) {
let current = this.head;

for (const chr of word) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이것도 중요한 사항은 아닙니다!
search와 startsWith가 완전히 동일한 로직을 공유하는것 같아서, 다른 메서드로 묶어주는것도 좋을것 같네요!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Solving
Development

Successfully merging this pull request may close these issues.

2 participants